﻿#ifndef QUERYKEYTHREAD_H
#define QUERYKEYTHREAD_H
#include <QThread>

#ifdef Q_OS_WIN
#include <windows.h>
#pragma comment(lib, "user32.lib")
#include <qt_windows.h>
#endif

extern int gMouseX;
extern int gMouseY;

class QueryKeyThread : public QThread
{
    Q_OBJECT
public:
    QueryKeyThread(QObject* parent=0);
    ~QueryKeyThread();
    void run();

signals:
    void queryResult(QString name);
    void mousePointChanged(int x, int y);
    void focusPointChanged(int x, int y);

private:
    POINT p;
    QString ConvertLPWSTRToLPSTR(LPWSTR lpwszStrIn);
};

#endif // QUERYKEYTHREAD_H
